﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace MassRenamer
{
	class FileNameValueConverter : IValueConverter
	{
		/// <summary>
		/// Convert a file path string to just the file name and extension
		/// </summary>
		/// <param name="value">The file path to convert</param>
		/// <param name="targetType">Not used</param>
		/// <param name="parameter">Not used</param>
		/// <param name="culture">Not used</param>
		/// <returns>The file name and extension without the path information</returns>
		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			string original = value as string;
			return System.IO.Path.GetFileName(original);
			
		}

		/// <summary>
		/// Not implemented
		/// </summary>
		/// <param name="value">Not implemented</param>
		/// <param name="targetType">Not implemented</param>
		/// <param name="parameter">Not implemented</param>
		/// <param name="culture">Not implemented</param>
		/// <returns>Not implemented</returns>
		public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}

	}
}
